package com.lfs.admin.dao;

import com.lfs.admin.model.entity.product.ProductGroupEntity;
import com.lfs.admin.model.entity.product.ProductToGroupEntity;
import com.lfs.admin.model.vo.product.ProductGroupVO;
import com.lfs.admin.model.vo.product.ProductToGroupVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductGroupDao {

    List<ProductGroupEntity> queryProductGroupList(ProductGroupVO productGroupVo);

    List<ProductToGroupEntity> getProductToGroup(ProductToGroupVO productToGroupVo);

    ProductGroupEntity getProductGroupById(@Param("id") Integer id);

    ProductGroupEntity getProductGroupByCode(@Param("groupNum") String groupNum);

    ProductToGroupEntity getProductToGroupByCode(@Param("groupNum") String groupNum,@Param("productNum") Long productNum);

    List<ProductGroupEntity> queryProductGroupSelectList();

    int updateProductGroup(ProductGroupVO productGroupVo);

    int updateDiscount(ProductToGroupVO productToGroupVo);

    int updateProductGroupStatus(ProductGroupVO productGroupVo);

    int updateProductToGroupStatus(ProductToGroupVO productToGroupVo);

    int addProductGroup(ProductGroupVO productGroupVo);

    int addProductToGroup(List<ProductToGroupVO> productToGroupVoList);

    int deleteProductGroup(Integer[] ids);

    int deleteProductToGroup(Integer[] ids);

}
